package br.ufrj.ppgi.infovis.styles;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.mt4j.util.MTColor;

public class Configuration {
	private String title;
	private Map<String, Category> categories;
	
	
	public Configuration(String title){
		this.title = title;
		categories = new HashMap<String, Category>();
		
	}
	
	public String getTitle(){
		return title;
	}
	
	public void addCategory(Category category){
		categories.put(category.getName(), category);
	}
	
	public Category[] getCategories(){
		return categories.values().toArray(new Category[0]);		
	}

	public MTColor getColorByCategoryName(String categoryName) {
		
		return categories.get(categoryName).getColor();
		
	}

	public String getIconByCategoryName(String categoryName) {
		
		return categories.get(categoryName).getIcon();
		
	}	
	
	
	
	

}
